{template Public:Admin:header}

<form action="/admin/{echo CONTROLLER_NAME}/{echo ACTION_NAME}/id/{echo $id}" method="post" id="SubmitData">
     <table class="table table-hover">
          <thead>
               <tr>
                    <th width="20%"> <i class="fa fa-circle-o"></i> 项目名称 </th>
                    <th>
                         <div class="col-lg-8"><i class="fa fa-code"></i> 项目值</div>
                    </th>
               </tr>
          </thead>
          <tbody>

               <tr>
                    <td> 标题 </td>
                    <td>
                         <div class="col-lg-8">
                              <input type="text" name="subject" value="{if !empty($manage['subject'])}{echo $manage['subject']}{/if}" class="form-control" data-bv-notempty="true" data-bv-notempty-message="该值不能为空">
                         </div>
                    </td>
               </tr>
                <tr>
                    <td> 分类{if $type==3}(默认使用任务){/if} </td><td>
                         <div class="col-lg-8">
                                <div class="btn-group">
                                        <a href="javascript:void(0);" class="btn btn-default" id="CategoryNanme">{if !empty($manage['category_name_1'])}{if $manage['category_name_3']}{echo $manage['category_name_3']} > {/if}{if $manage['category_name_2']}{echo $manage['category_name_2']} > {/if}{echo $manage['category_name_1']}{else}请选择分类{/if}</a>
                                        <a href="javascript:void(0);" data-toggle="dropdown" class="btn btn-default  dropdown-toggle"><i class="fa fa-angle-down"></i></a>
                                        <ul class="dropdown-menu" id="TaskCategory" style="z-index:1001"></ul>
                              </div>
                         </div>
                    </td>
               </tr>
               
                <tr>
                    <td> 作者 </td><td>
                         <div class="col-lg-8">
                              <input type="text" name="author" value="{if !empty($manage['author'])}{echo $manage['author']}{/if}" class="form-control" data-bv-notempty="true" data-bv-notempty-message="该值不能为空">
                         </div>
                    </td>
               </tr>
               
               
                <tr>
                    <td> 访问量 </td><td>
                         <div class="col-lg-8">
                              <input type="text" name="show_number" value="{if !empty($manage['show_number'])}{echo $manage['show_number']}{/if}" class="form-control">
                         </div>
                    </td>
               </tr>

               
               <tr>
                    <td> 封面图 </td><td>
                         <div class="col-lg-8">
                           <div class="row">
                           		 <div class="col-lg-12">{if !empty($manage['picture'])}<img src="/{echo $manage['picture']}"/>{/if}</div>
                                 <script>var upload_extensions_title='Images'; var upload_extensions='gif,jpg,jpeg,png'; var upload_mimetypes='image/*'; </script>
                                 {template Public:Page:webuploader}
                                 <div class="col-lg-12">
                                <div class="form-group has-feedback">
                                <a href="javascript:void(0);" id="UploadFile">添加封面图</a>
                                </div>
                                </div>
                            </div>
                          </div>
                    </td>
               </tr>
               
                <tr>
                    <td> 内容 </td><td>
                         <div class="col-lg-8">
                         {template Public:Page:umeditor}
                             <div class="form-group has-feedback">
                                <textarea id="Content" name="content" style="width:100%;height:500px;">{if !empty($manage['content'])}{echo htmlspecialchars_decode($manage['content'])}{/if}</textarea>
                                </div>
                         </div>
                    </td>
               </tr>
               
                <tr>
                    <td> 关键词 </td>
                    <td>
                         <div class="col-lg-8">
                              <input type="text" name="keywords" value="{if !empty($manage['keywords'])}{echo $manage['keywords']}{/if}" class="form-control" data-bv-notempty="true" data-bv-notempty-message="该值不能为空">
                         </div>
                    </td>
               </tr>
               
                <tr>
                    <td> 描述 </td>
                    <td>
                         <div class="col-lg-8">
                              <input type="text" name="description" value="{if !empty($manage['description'])}{echo $manage['description']}{/if}" class="form-control" data-bv-notempty="true" data-bv-notempty-message="该值不能为空">
                         </div>
                    </td>
               </tr>
                                               
               <tr>
                    <td class="width_160">状态</td>
                    <td>
                         <div class="col-lg-8">
                              <select name="status" class="form-control">
                                   <option value="0" {if empty($manage['status'])}selected="selected" {/if}>是否开启</option>
                                   <option value="1" {if !empty($manage['status'])}{if $manage['status']==1} selected="selected" {/if}{/if}>正常</option>
                                   <option value="2" {if !empty($manage['status'])}{if $manage['status']==2} selected="selected" {/if}{/if}>关闭</option>
                              </select>
                         </div>
                    </td>
               </tr>
               
               
          </tbody>
     </table>
     <div class="padding_20 text-center">
          <input type="hidden" name="Submit" value="true"/>
          <button class="btn btn-primary shiny" type="submit">提 交</button>
          <input type="hidden" name="datatype" value="json"/>
          <input type="hidden" name="catid" id="Catid" value="{if !empty($manage['catid'])}{echo $manage['catid']}{/if}"/>
          <input type="hidden" name="id" value="{echo $id}"/>
     </div>
</form>
<script>
$(function(){
	
	 var um = UM.getEditor('Content');
	 
	 um.addListener("contentChange",function(){
		if(UM.getEditor('Content').hasContents()){
			$('#TaskForm button[type="submit"]').attr('disabled',false);
		}
	 });
	 
	 {if $type==1}
	 	SetFormCategory(AURL+"/js/foxphp_json_news_category.js",'#TaskCategory');
	 {elseif $type==2}
	 	SetFormCategory(AURL+"/js/foxphp_json_help_category.js",'#TaskCategory');
	 {elseif $type==3}
	 	SetFormCategory(AURL+"/js/foxphp_json_task_category.js",'#TaskCategory');
	 {/if}

});

</script>				
{template Public:Admin:footer}